import { getVoyageOptions } from "@/api/options/options";


export const voyageOptionsMixin = {
  data() {
    return {
      // 航次的options
      voyageOptions: [],
    };
  },
  methods: {
    /**
     * 获取航次的options
     * @returns {Promise<void>}
     */
    async getVoyageOptions() {
      const response = await getVoyageOptions();
      this.voyageOptions = response.data;
    }
  },
  created() {
    // 获取航次的options
    this.getVoyageOptions();
  },
};
